1. Field of the Invention
The present invention relates to an image processing system for the eyes of an intelligence robot or an optical inspection device and more particularly to an image binarization threshold computing system which is used in calculation of a threshold value for deriving the optimum binary image from a multilevel image such as a density image or a distance image.
2. Description of the Prior Art
The present applicant previously proposed a system for computing the optimum threshold value for binarization of a multilevel image in Japanese Patent Application No. 62- 208849/1987.
In that system, a window is positioned on a multilevel image and, with the brightness of a picture element in a specific location within the window being used as a reference, it is reasoned by the binary logic whether the binary image pattern in the whole window area that can be obtained on binarization of the other elements within the window will be a smooth-edged pattern (valid pattern). The results of such reasoning are accumulated for each brightness level of reference picture elements. As the whole image area is scanned with the window, the above reasoning and cumulation procedures are repeated until the whole image area is covered.
For normalization, a histogram of brightness is constructed from cumulative values for the respective brightness levels of picture elements over the entire image area and then a histogram of picture quality is generated by division. Finally, the brightness corresponding to the minimum value in this picture quality histogram is chosen as the optimum binarization threshold value.
Thus, as a candidate binarization threshold value for improving the picture quality, the picture quality within the window is regionally evaluated using the picture element in a given location within the window as a reference, results of such evaluation are accumulated over the entire image area, and the optimum binarization threshold value is calculated using the cumulative values.
A binary image of good picture quality is an image such that the edges of the white and black picture elements are not serrated but continuous and smooth. The optimum threshold value is the threshold value which gives the best picture quality on binarization.
The apparatus previously proposed as above, are advantageous in that, unlike the p-tile method, it is applicable even where the size of the subject is unknown and that it does not require a time-consuming arithmetic operation as in the case of Ohtsu's threshold method.
However, the previously proposed apparatus cannot provide a smooth histogram of picture quality and, therefore, requires a smoothing operation for deriving the minimum value. For his reason, the apparatus cannot detect a delicate threshold value. Another disadvantage of the apparatus is that the histogram of picture quality changes every time a new image data is introduced.
In light of the above, the present invention enables not only delicate detection of the binarization threshold value without need for smoothing operation but permits generating of a stable histogram of picture quality.